// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';
const apiPrefix = '/web';

/** 数据列查询 GET /v1/device/history/curve/columns */
export async function historyCurveControllerDataColumnList(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.historyCurveControllerDataColumnListParams,
  options?: { [key: string]: any },
) {
  return request<API.ApiResultListDataColumnDTO>(`${apiPrefix}/v1/device/history/curve/columns`, {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** Metadata POST /v1/device/history/curve/metadata */
export async function historyCurveControllerMetadata(
  body: API.HistoryCurveQuery,
  options?: { [key: string]: any },
) {
  return request<API.ApiResultDataCurveDTO>(`${apiPrefix}/v1/device/history/curve/metadata`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** Metadata export POST /v1/device/history/curve/metadata/export */
export async function historyCurveControllerMetadataExport(
  body: API.HistoryCurveQuery,
  options?: { [key: string]: any },
) {
  return request<any>(`${apiPrefix}/v1/device/history/curve/metadata/export`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** Metadata list POST /v1/device/history/curve/metadata/list */
export async function historyCurveControllerMetadataList(
  body: API.HistoryCurveQuery,
  options?: { [key: string]: any },
) {
  return request<API.ApiResultHistoryCurveDTO>(
    `${apiPrefix}/v1/device/history/curve/metadata/list`,
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** Statistics POST /v1/device/history/curve/statistics */
export async function historyCurveControllerStatistics(
  body: API.HistoryCurveQuery,
  options?: { [key: string]: any },
) {
  return request<API.ApiResultDataCurveDTO>(`${apiPrefix}/v1/device/history/curve/statistics`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** Statistics export POST /v1/device/history/curve/statistics/export */
export async function historyCurveControllerStatisticsExport(
  body: API.HistoryCurveQuery,
  options?: { [key: string]: any },
) {
  return request<any>(`${apiPrefix}/v1/device/history/curve/statistics/export`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** Statistics list POST /v1/device/history/curve/statistics/list */
export async function historyCurveControllerStatisticsList(
  body: API.HistoryCurveQuery,
  options?: { [key: string]: any },
) {
  return request<API.ApiResultHistoryCurveDTO>(
    `${apiPrefix}/v1/device/history/curve/statistics/list`,
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      data: body,
      ...(options || {}),
    },
  );
}
